DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / Send Method / Send(String,Int32,String,String,IEnumerable<String>) Method

Network address (as dotted notation or resolvable name) to which the image is to be sent

Port on which remote application is listening

Name of remote Application Entity

Name to quote for this Application Entity

A list of offered Transfer Syntaxes

Example

In This Topic
    Send(String,Int32,String,String,IEnumerable<String>) Method
    In This Topic
    Sends an image to a remote Storage SCP
    Syntax
    'Declaration
     
    
    Public Overloads Function Send( _
       ByVal Node As System.String, _
       ByVal Port As System.Integer, _
       ByVal CallingAE As System.String, _
       ByVal CalledAE As System.String, _
       ByVal OfferedTS As System.Collections.Generic.IEnumerable(Of String) _
    ) As System.Integer
    public System.int Send( 
       System.string Node,
       System.int Port,
       System.string CallingAE,
       System.string CalledAE,
       System.Collections.Generic.IEnumerable<string> OfferedTS
    )

    Parameters

    Node

    Network address (as dotted notation or resolvable name) to which the image is to be sent

    Port

    Port on which remote application is listening

    CallingAE

    Name of remote Application Entity

    CalledAE

    Name to quote for this Application Entity

    OfferedTS

    A list of offered Transfer Syntaxes

    Return Value

    The status as returned by the remote application. Zero indicates success.

    Remarks
    This method negotiates an association, sends one image over it, and then closes it. DICOM does not allow SCPs to draw any conclusions about the relationships between images based on the opening and closing of associations, so this should never be a problem (apart from slight network inefficiency). However, there are several badly written applications in the world, which incorrectly assume that the end of an association indicates the end of a series or a study etc., and if interfacing to such a faulty implementation, it is possible to send multiple images on one association by using a DicomAssociation object, and its SendInstances methods.
    Example
    DicomImage image = new DicomImage("your_dicom_image.dcm");
                        
    // Define a list of Transfer Syntaxes to offer during the association negotiation
    List<string> offeredTS = new List<string> 
    { 
        "1.2.840.10008.1.2.1",     // Explicit VR Little Endian
        "1.2.840.10008.1.2.4.70"  // JPEG Lossless, Non-Hierarchical, First-Order Prediction
    };
                        
    var status = image.Send("localhost", 12345, "client", "local_server"); // sending to a local server  
                        
    if (status == 0)
        Console.WriteLine("Image send successfully");
    else 
        Console.WriteLine($"Image sending failed. Status code: {status}");
        
    // Sending to our public DICOM server    
    var status = image.Send("dicomserver.co.uk", 104, "client", "svr", offeredTS);
    Requirements

    Target Platforms: .NET CLR 4.8 or higher

    See Also